<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="/wk3un7/backstage/lib/css/layui.css" />
<script type="text/javascript" src="/wk3un7/backstage/layui/layui.js"></script>
	</head>
	<body>
			<form class="layui-form"   action="">
				<div class="layui-form-item" hidden="hidden">
					<label class="layui-form-label">ID:</label>
					<div class="layui-input-inline" style="width:350px;">
						<input type="text" id="proid" name="proid" class="layui-input" readonly="true">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">商品分类名称:</label>
					<div class="layui-input-inline" style="width:350px;">
						<input type="text" id="productTypeName" name="productTypeName" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">分类名称:</label>
					<div class="layui-input-inline" style="width:350px;">
						<input type="text" id="Name" name="Name" class="layui-input">
					</div>
				</div>
				<div class="layui-btn-container" style="text-align:center;">
					<button class="layui-btn" lay-filter="userEditBtu" lay-submit="">
                        	修改
                    </button>
				</div>
			</form>
		</div>
		<script>
			layui.use('form', function() {
				var form = layui.form;
				var $ = layui.jquery; 

				form.on('submit(userEditBtu)', function(data) {
					var d = data.field; 
					d.method = "update"; 
					
					console.log(d); 
					var url = '/wk3un7/Houfenlei';
		
					$.post(url, d,
						function(data) {
							if(data.count>0){
								 console.log('修改成功');
								 var index=parent.layer.getFrameIndex(window.name); 
             					 parent.layer.close(index);		
							}
						}, "json");
					return false;
				});
			});
		</script>
	</body>
</html>
